package com.longsunhd.yum.buffalo.network.api;

import com.longsunhd.yum.buffalo.bean.DragListBean;
import com.longsunhd.yum.buffalo.bean.GetMedicationFieldBean;
import com.longsunhd.yum.buffalo.bean.SubmitBean;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 作者：黄宣淇
 * 时间：2021/5/10 0010
 * 如何代码没有备注，一个月后，只有你和上帝知道--鲁迅
 */
public interface MedicationApi extends BaseApi {
    /**
     * 获取用药字段
     * @return
     */
    @GET("api/manage/medication-log")
    Observable<GetMedicationFieldBean> getMedication(@Query("id") String type);
    /*药品*/
    @GET("api/manage/drug-option")
    Observable<DragListBean> getDrugOption();
    @FormUrlEncoded
    @POST("api/manage/medication-log")
    Observable<SubmitBean> postMedication(@FieldMap Map<String, String> map);

}
